<style>
.weui_cell_bd {
    padding: 0;
	min-height:1.6rem;
	line-height:1.6rem;
}
.weui_cell_hd {min-width:3.7rem;padding: 0 4px;}
.weui_input {padding:0}
.btn-danger-o{border-radius: 100px;}
</style>
<div class='fui-page fui-page-current page-commission-register'>
	<img style="width:100%;position: relative" ng-src="{{tomedia(pagedata.pluginset.applybg) || '../addons/jy_weishop/resource/images/myshoptop.jpg'}}" />
	<div ng-if="pagedata.member.stop==1" class='fui-content'>
        <div  class='content-empty' >
            <i class='icon icon-info text-danger'></i>
            <br/><span class="text-danger">禁止申请，请联系客服！</span>
        </div>
	</div>
	<div ng-if="pagedata.member.stop !=1">
	<div ng-if="pagedata.member.yuejie_type>0" class='fui-content'>
		<div ng-if="pagedata.member.yuejie_type==4" class='content-info' >
            <i class='icon icon-clock'></i>
            <br/><span class="">谢谢您的支持，请等待审核！</span>
			<br/><a class="btn  btn-sm btn-danger-o " href="javascript:;" ng-click="access_json(main.menus[0].action || 'jy_weishop/index/')">前往首页</a>
        </div>
		<div ng-if="pagedata.member.yuejie_type==3" class='content-info' >
            <i class='icon icon-clock'></i>
            <br/><span class="">您的月结身份属于【待缴年费】状态！</span>
			<br/><a class="btn btn-sm btn-danger-o" href="javascript:;" ng-click="access_json('jy_yuejie/setyajin/')">前往缴费</a>
		</div>
		<div ng-if="pagedata.member.yuejie_type==1" class='content-info' >
            <i class='icon icon-clock'></i>
            <br/><span class="">恭喜您，您的月结申请已审核通过！</span>
            <br/><a class="btn  btn-sm btn-danger-o " href="javascript:;" ng-click="access_json('jy_yuejie/index/')">前往月结中心</a>
        </div>
		<div ng-if="pagedata.member.yuejie_type==5" class='content-info' >
            <i class='icon icon-clock'></i>
            <br/><span class="">非常抱歉，您的月结申请被管理员拒绝！</span>
			<br/><span class="">未审核通过原因：</span>
			<br/><span class="subtitle">{{pagedata.apply.remark || '无'}}</span>
            <br/><a class="btn  btn-sm btn-danger-o" href="javascript:;" ng-click="pagedata.applyagain=1">重新申请</a>
        </div>
	</div>
    <div ng-if="(pagedata.member.yuejie_type==0 && pagedata.can_apply) || pagedata.applyagain" class='fui-content'>
		<div style="padding:0.5rem">
        <div class="fui-cell-group" style='margin-top:0'>
            <div class="fui-cell-title">
                欢迎加入<span class='text-danger'>本平台</span>，请填写申请信息
            </div>
            <div class='fui-cell'>
                <div class='fui-cell-label must'>姓名</div>
                <div class='fui-cell-info'><input type="text" class='fui-input' ng-model="pagedata.post.realname" placeholder="请填写真实姓名，用于结算" /></div>
            </div>
			<div class="fui-cell">
					<div class="fui-cell-label">手机号</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="pagedata.post.mobile" /></div>
					<div ng-if="pagedata.dxmb" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.post.mobile,'smscode')" id="smscode">获取验证码</a></div>
			</div>
			<div ng-if="pagedata.dxmb" class="fui-cell">
					<div class="fui-cell-label ">验证码</div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.post.smscode" /></div>
			</div>
			 <div class='fui-cell'>
                <div class='fui-cell-label'>微信号</div>
                <div class='fui-cell-info'><input type="text" class='fui-input' ng-model="pagedata.post.wechat" placeholder="请填写微信号"  /></div>
            </div>
			<div class='fui-cell'>
                <div class='fui-cell-label must'>居住地址</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" id="address" placeholder="居住地址" ng-model="pagedata.post.address"></div>
				<div class="fui-cell-remark noremark" ng-click="tool.choose_location(pagedata.post,'address','address')"><i class="icon icon-ditu"></i></div>
            </div>
		</div>
        <div class="fui-cell-group">
                <div class="fui-cell small ">
                    <div class="fui-cell-info">
                        <label class="checkbox-inline">
                            <input type="checkbox" class="fui fui-checkbox fui-checkbox-danger" ng-model="pagedata.post.agree" /> 我已经阅读并了解了<a id="btn-apply" ng-click="pagedata.show_content=true" style="color:#337ab7;">【{{pagedata.pluginset.applytitle}}】</a>。
                        </label>

                    </div>
                </div>
         </div>
         <div ng-show="pagedata.show_content" class="modal-bg pop-apply-hidden" >
                <div class="modal-content" style="top:10%;width:90%;left:5%">
                    <div class="closebtn" ng-click="pagedata.show_content=false" style="opacity:1;"><i class="icon icon-cuowu"></i></div>
                    <div class="news-body">
						<div class="title">{{pagedata.pluginset.applytitle}} / <small>Read &nbsp;Ggree</small></div>
                        <div class="text" ng-bind-html="trust(pagedata.pluginset.applycontent)"></div>
                    </div>
					<div class="modal-footer">
                            <div ng-click="pagedata.show_content=false" class="mod-check" style="width: 100%; margin: 0;">我已阅读</div>
                    </div>
                </div>
         </div>
		<div ng-if="!pagedata.order_id && pagedata.pluginset.yuejie_open==1 && pagedata.pluginset.yuejie_price>0" class='btn btn-danger block btn-submit' style="margin-top:2rem" ng-click="pagedata.pay_submit(pagedata.post,'jy_yuejie/apply/apply/','jy_yuejie/vip_log/')">申请成为单位客户<span>(年费{{pagedata.pluginset.yuejie_price}}/年)</span></div>
        <div ng-if="pagedata.order_id" class='btn btn-danger block btn-submit' style="margin-top:2rem" ng-click="access_json('jy_yuejie/vip_log/')">查看订单</div>
		<div ng-if="pagedata.pluginset.yuejie_open!=1 || !pagedata.pluginset.yuejie_price || pagedata.pluginset.yuejie_price<=0" class='btn btn-danger block btn-submit' style="margin-top:2rem" ng-click="post(pagedata.post,'jy_yuejie/apply/apply/')">申请成为单位客户</div>
		 </div>
		</div>
	</div>
	</div>
</div>
<script type="text/javascript">
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url,complete_url);
		}
	});
}
</script>